package com.ts.conch.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@TableName(value = "ts_admin_log")
@Data
public class TsAdminLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    @ApiModelProperty(value = "主键logId")
    private String logId;

    @ApiModelProperty(value = "用户id")
    private String adminId;

    @ApiModelProperty(value = "ip地址")
    private String ip;

    @ApiModelProperty(value = "请求城市")
    private String city;

    @ApiModelProperty(value = "浏览器或者app信息")
    private String client;

    @ApiModelProperty(value = "请求uri")
    private String uri;

    @ApiModelProperty(value = "请求方法")
    private String method;

    @ApiModelProperty(value = "请求")
    private String request;

    @ApiModelProperty(value = "响应")
    private String response;

    @ApiModelProperty(value = "状态")
    private Boolean status;

    @ApiModelProperty(value = "耗时ms")
    private Integer cost;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}